package com.gs.cd.service.auth.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AuthConfig {

    /**
     * 默认密码
     */
    @Value(value = "${auth.user.default-password:password123}")
    private String defaultPassword;


    /**
     * sso登录根路径
     */
    @Value("${auth.sso-url.root:'https://sso-internal.gridsumdissector.com/api/v2'}")
    private String ssoUrlRoot;

    /**
     * 是否使用sso方式登录，默认：true
     */
    @Value("${auth.sso-login:true}")
    private boolean ssoLogin;

    private final String puk = "f4cb2693d0944a79b2a00e30d840849ca728c816f65e3a3f4951164e6bd79929";
    /**
     * 私匙
     */
    private final String prk = "dd70ec4f3c551aabb5a8e9db787ec88bb1fb605d8989e91875b14c5945490a29";

    /**
     * 是否使用 sso登录模式
     *
     * @return
     */
    public boolean useSSOLogin() {
        return ssoLogin;
    }

    public String getDefaultPassword() {
        return defaultPassword;
    }

    public String getPuk() {
        return puk;
    }

    public String getPrk() {
        return prk;
    }
}